|
mcurrentsens 2.2.0
|
This file contains API for mCurrent Sens Click Driver. More...
#include "drv_digital_out.h"#include "drv_digital_in.h"#include "drv_spi_master.h"#include "spi_specifics.h"#include "drv_i2c_master.h"Go to the source code of this file.
Data Structures | |
| struct | mcurrentsens_calib_t |
| mCurrent Sens calibration data structure. More... | |
| struct | mcurrentsens_t |
| mCurrent Sens Click context object. More... | |
| struct | mcurrentsens_cfg_t |
| mCurrent Sens Click configuration object. More... | |
Enumerations | |
| enum | mcurrentsens_return_value_t { MCURRENTSENS_OK = 0 , MCURRENTSENS_ERROR = -1 } |
| mCurrent Sens Click return value data. More... | |
Functions | |
| void | mcurrentsens_cfg_setup (mcurrentsens_cfg_t *cfg) |
| mCurrent Sens configuration object setup function. | |
| err_t | mcurrentsens_init (mcurrentsens_t *ctx, mcurrentsens_cfg_t *cfg) |
| mCurrent Sens initialization function. | |
| err_t | mcurrentsens_default_cfg (mcurrentsens_t *ctx) |
| mCurrent Sens default configuration function. | |
| err_t | mcurrentsens_write_reg (mcurrentsens_t *ctx, uint8_t reg, uint8_t data_in) |
| mCurrent Sens write register function. | |
| err_t | mcurrentsens_read_reg (mcurrentsens_t *ctx, uint8_t reg, uint8_t *data_out) |
| mCurrent Sens read register function. | |
| err_t | mcurrentsens_write_regs (mcurrentsens_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
| mCurrent Sens write multiple registers function. | |
| err_t | mcurrentsens_read_regs (mcurrentsens_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
| mCurrent Sens read multiple registers function. | |
| err_t | mcurrentsens_write_reg16 (mcurrentsens_t *ctx, uint8_t reg, uint16_t data_in) |
| mCurrent Sens write 16-bit register function. | |
| err_t | mcurrentsens_read_reg16 (mcurrentsens_t *ctx, uint8_t reg, uint16_t *data_out) |
| mCurrent Sens read 16-bit register function. | |
| err_t | mcurrentsens_write_reg24 (mcurrentsens_t *ctx, uint8_t reg, uint32_t data_in) |
| mCurrent Sens write 24-bit register function. | |
| err_t | mcurrentsens_read_reg24 (mcurrentsens_t *ctx, uint8_t reg, uint32_t *data_out) |
| mCurrent Sens read 24-bit register function. | |
| err_t | mcurrentsens_send_fast_cmd (mcurrentsens_t *ctx, uint8_t cmd) |
| mCurrent Sens send fast command function. | |
| err_t | mcurrentsens_check_com (mcurrentsens_t *ctx) |
| mCurrent Sens communication check function. | |
| err_t | mcurrentsens_set_mux (mcurrentsens_t *ctx, uint8_t vin_p, uint8_t vin_n) |
| mCurrent Sens set MUX function. | |
| err_t | mcurrentsens_set_gain (mcurrentsens_t *ctx, uint8_t gain) |
| mCurrent Sens set gain function. | |
| err_t | mcurrentsens_set_osr (mcurrentsens_t *ctx, uint8_t osr) |
| mCurrent Sens set OSR function. | |
| err_t | mcurrentsens_set_mode (mcurrentsens_t *ctx, uint8_t mode) |
| mCurrent Sens set mode function. | |
| err_t | mcurrentsens_get_irq (mcurrentsens_t *ctx, uint8_t *data_out) |
| mCurrent Sens get IRQ function. | |
| err_t | mcurrentsens_set_offset_cal (mcurrentsens_t *ctx, int32_t data_in) |
| mCurrent Sens set offset calibration function. | |
| err_t | mcurrentsens_get_offset_cal (mcurrentsens_t *ctx, int32_t *data_out) |
| mCurrent Sens get offset calibration function. | |
| err_t | mcurrentsens_set_gain_cal (mcurrentsens_t *ctx, uint32_t data_in) |
| mCurrent Sens set gain calibration function. | |
| err_t | mcurrentsens_get_gain_cal (mcurrentsens_t *ctx, uint32_t *data_out) |
| mCurrent Sens get gain calibration function. | |
| err_t | mcurrentsens_en_dig_cal (mcurrentsens_t *ctx, uint8_t en_offset, uint8_t en_gain) |
| mCurrent Sens enable digital calibration function. | |
| err_t | mcurrentsens_apply_calib (mcurrentsens_t *ctx, mcurrentsens_calib_t cal) |
| mCurrent Sens apply channel calibration function. | |
| err_t | mcurrentsens_wait_data_ready (mcurrentsens_t *ctx) |
| mCurrent Sens wait data ready function. | |
| err_t | mcurrentsens_read_adc (mcurrentsens_t *ctx, int32_t *data_out) |
| mCurrent Sens read ADC data function. | |
| err_t | mcurrentsens_read_adc_avg (mcurrentsens_t *ctx, uint8_t sample_count, int32_t *data_out) |
| mCurrent Sens read averaged ADC function. | |
| err_t | mcurrentsens_read_voltage_avg (mcurrentsens_t *ctx, uint8_t sample_count, float *data_out) |
| mCurrent Sens read averaged voltage function. | |
| err_t | mcurrentsens_read_ch1_current (mcurrentsens_t *ctx, float *data_out) |
| mCurrent Sens read channel 1 current function. | |
| err_t | mcurrentsens_read_ch1_voltage (mcurrentsens_t *ctx, float *data_out) |
| mCurrent Sens read channel 1 voltage function. | |
| err_t | mcurrentsens_read_ch2_current (mcurrentsens_t *ctx, float *data_out) |
| mCurrent Sens read channel 2 current function. | |
| err_t | mcurrentsens_read_ch2_voltage (mcurrentsens_t *ctx, float *data_out) |
| mCurrent Sens read channel 2 voltage function. | |
| err_t | mcurrentsens_read_temperature (mcurrentsens_t *ctx, float *data_out) |
| mCurrent Sens read temperature function. | |
| float | mcurrentsens_adc_to_mv (int32_t adc_code, float gain_adc) |
| mCurrent Sens convert ADC code to millivolts function. | |
| void | mcurrentsens_calculate_calib (mcurrentsens_calib_t *calib, float offset_coeff, float target_1, float measured_1, float target_2, float measured_2) |
| mCurrent Sens calculate calibration function. | |
| err_t | mcurrentsens_write_memory (mcurrentsens_t *ctx, uint8_t address, uint8_t *data_in, uint8_t len) |
| mCurrent Sens write memory function. | |
| err_t | mcurrentsens_read_memory (mcurrentsens_t *ctx, uint8_t address, uint8_t *data_out, uint8_t len) |
| mCurrent Sens read memory function. | |
| err_t | mcurrentsens_store_calib (mcurrentsens_t *ctx) |
| mCurrent Sens store calibration function. | |
| err_t | mcurrentsens_fetch_calib (mcurrentsens_t *ctx) |
| mCurrent Sens fetch calibration function. | |
| uint8_t | mcurrentsens_get_irq_pin (mcurrentsens_t *ctx) |
| mCurrent Sens get IRQ pin function. | |
| uint8_t | mcurrentsens_get_clk_pin (mcurrentsens_t *ctx) |
| mCurrent Sens get CLK pin function. | |
This file contains API for mCurrent Sens Click Driver.